#include <bits/stdc++.h>

#define in read()
#define fi first
#define se second
#define pb push_back
#define rep(i, x, y) for(int i = (x); i <= (y); i++)
#define per(i, x, y) for(int i = (x); i >= (y); i--)

using namespace std;

using pii = pair < int , int >;
using vec = vector < int >;
using veg = vector < pii >;
using ll = long long;

int read() {
    int x = 0; bool f = 0; char ch = getchar(); while(!isdigit(ch)) f |= ch == '-',ch = getchar();
    while(isdigit(ch)) x = x * 10 + (ch ^ 48),ch = getchar(); return f ? -x : x;
}

const int N = 1e5 + 10;
const int inf = 0x3f3f3f3f;

int l[N],r[N],n,m;
ll ans[N];
int rt[N];

namespace seg {
	const int L = 1e7 + 10;
	int mn[L],ndn,ch[L][2];
	void ins(int &x, int pos, int v, int l = 1,int r = n) {
		if(!x) x = ++ndn,mn[x] = inf; mn[x] = min(mn[x],v); if(l == r) return; int mid = l + r >> 1;
		if(pos <= mid) ins(ch[x][0], pos, v, l, mid); else ins(ch[x][1], pos, v, mid + 1, r);
	}
	int query(int x,int xl,int xr,int l = 1,int r = n) {
		if(!x) return inf; if(xl == l && xr == r) return mn[x]; int mid = l + r >> 1;
		if(xr <= mid) return query(ch[x][0], xl, xr, l, mid); else if(xl > mid) return query(ch[x][1], xl, xr, mid + 1, r);
		else return min(query(ch[x][0], xl, mid, l, mid), query(ch[x][1], mid + 1, xr, mid + 1,r));
	}
}

void ins(int l,int r,int id) {
	for(; r <= n; r += r & -r) seg :: ins(rt[r], l, id);
}

int query(int l,int r) {
	int val = inf;
	for(; r >= l; r-= r & -r) val = min(val,seg :: query(rt[r], l, n));
	return val;
}

vec pot[N];

ll calc(int xl, int xr, int x) {
	if(xr - xl + 1 < x) return 0;
	int id = query(xl, xr); if(id == inf) return 0;
	return r[id] - l[id] + 1 + calc(xl, l[id] - 1, x) + calc(r[id] + 1, xr, x);
}

int main() {
#ifndef ONLINE_JUDGE
    freopen("1.in","r",stdin);
#endif
    n = in, m = in;
	rep(i, 1, m) l[i] = in, r[i] = in, pot[r[i] - l[i] + 1].pb(i);
	per(i, n, 1) {
		for(int id : pot[i]) ins(l[id], r[id], id);
		ans[i] = calc(1, n, i); 
	}
	rep(i, 1, n) printf("%lld\n",ans[i]);
	return 0;
}
